#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int  n;
    double count = 0, price;
    char buf[1024], *p;
    //给指针p分配空间
    p = (char *)malloc(sizeof(char) * 100);

    scanf("%d", &n);
    getchar(); //先读取数字，后读取字符，buffer缓存区有'\n',消除这个影响
    count = 0;
    
    for (int i = 0; i < n; i++)
    {
        gets(buf);
        p = strrchr(buf, ' '); //strrchr返回字符' '在串buf中最后一次出现的位置
                               //失败返回NULL
        sscanf(p, "%lf", &price);
        count += price;
    }
    printf("%.1f\n", count);
}